Left Termination of the query pattern mergesort_in_2(a, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PredefinedPredicateTransformerProof

Clauses:

mergesort([], []).
mergesort(.(X, []), .(X, [])).
mergesort(.(X, .(Y, Xs)), Ys) :- ','(split(.(X, .(Y, Xs)), X1s, X2s), ','(mergesort(X1s, Y1s), ','(mergesort(X2s, Y2s), merge(Y1s, Y2s, Ys)))).
split([], [], []).
split(.(X, Xs), .(X, Ys), Zs) :- split(Xs, Zs, Ys).
merge([], Xs, Xs).
merge(Xs, [], Xs).
merge(.(X, Xs), .(Y, Ys), .(X, Zs)) :- ','(=(X, Y), merge(.(X, Xs), Ys, Zs)).

Queries:

mergesort(a,g).

Added definitions of predefined predicates.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof

Clauses:

mergesort([], []).
mergesort(.(X, []), .(X, [])).
mergesort(.(X, .(Y, Xs)), Ys) :- ','(split(.(X, .(Y, Xs)), X1s, X2s), ','(mergesort(X1s, Y1s), ','(mergesort(X2s, Y2s), merge(Y1s, Y2s, Ys)))).
split([], [], []).
split(.(X, Xs), .(X, Ys), Zs) :- split(Xs, Zs, Ys).
merge([], Xs, Xs).
merge(Xs, [], Xs).
merge(.(X, Xs), .(Y, Ys), .(X, Zs)) :- ','(=(X, Y), merge(.(X, Xs), Ys, Zs)).
=(X, X).

Queries:

mergesort(a,g).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
mergesort_in: (f,b) (b,f)
split_in: (b,f,f) (f,f,f)
merge_in: (b,b,f) (b,f,f) (b,b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
PiTRS
          ↳ DependencyPairsProof
      ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GAA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x6)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x5)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x6)
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x5, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x5)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x6)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x4, x5, x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x5)
U7_GAA(x1, x2, x3, x4, x5, x6)  =  U7_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x4, x5, x6)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
PiDP
              ↳ DependencyGraphProof
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GAA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x6)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x5)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x6)
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x5, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x5)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x6)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x4, x5, x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x5)
U7_GAA(x1, x2, x3, x4, x5, x6)  =  U7_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x4, x5, x6)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 25 less nodes.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
PiDP
                    ↳ UsableRulesProof
                  ↳ PiDP
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
PiDP
                        ↳ PiDPToQDPProof
                  ↳ PiDP
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

=_in_aa(X, X) → =_out_aa(X, X)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ Rewriting
                  ↳ PiDP
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MERGE_IN_GAA(.) → U6_GAA(=_in_aa)
U6_GAA(=_out_aa) → MERGE_IN_GAA(.)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule MERGE_IN_GAA(.) → U6_GAA(=_in_aa) at position [0] we obtained the following new rules:

MERGE_IN_GAA(.) → U6_GAA(=_out_aa)



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Rewriting
QDP
                                ↳ UsableRulesProof
                  ↳ PiDP
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
                  ↳ PiDP
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

R is empty.
The set Q consists of the following terms:

=_in_aa

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

=_in_aa



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ NonTerminationProof
                  ↳ PiDP
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

The TRS R consists of the following rules:none


s = MERGE_IN_GAA(.) evaluates to t =MERGE_IN_GAA(.)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

MERGE_IN_GAA(.)U6_GAA(=_out_aa)
with rule MERGE_IN_GAA(.) → U6_GAA(=_out_aa) at position [] and matcher [ ]

U6_GAA(=_out_aa)MERGE_IN_GAA(.)
with rule U6_GAA(=_out_aa) → MERGE_IN_GAA(.)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.





↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
PiDP
                    ↳ UsableRulesProof
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
PiDP
                        ↳ PiDPToQDPProof
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ NonTerminationProof
                  ↳ PiDP
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

SPLIT_IN_AAASPLIT_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SPLIT_IN_AAASPLIT_IN_AAA

The TRS R consists of the following rules:none


s = SPLIT_IN_AAA evaluates to t =SPLIT_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SPLIT_IN_AAA to SPLIT_IN_AAA.





↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
PiDP
                    ↳ UsableRulesProof
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
PiDP
                        ↳ PiDPToQDPProof
      ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)

The TRS R consists of the following rules:

mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
=_in_aa(X, X) → =_out_aa(X, X)
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ Narrowing
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)
U1_GA(split_out_gaa(X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_GA(split_out_gaa(X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s)) at position [1] we obtained the following new rules:

U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U1_GA(split_out_gaa([], y1)) → U2_GA(y1, mergesort_out_ga([]))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ DependencyGraphProof
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_GA(split_out_gaa([], y1)) → U2_GA(y1, mergesort_out_ga([]))
MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ Narrowing
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.)) at position [0] we obtained the following new rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ ForwardInstantiation
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s)
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U1_GA(split_out_gaa(X1s, X2s)) → MERGESORT_IN_GA(X1s) we obtained the following new rules:

U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.)



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
QDP
                                            ↳ ForwardInstantiation
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s)
U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U2_GA(X2s, mergesort_out_ga(Y1s)) → MERGESORT_IN_GA(X2s) we obtained the following new rules:

U2_GA(., mergesort_out_ga(x1)) → MERGESORT_IN_GA(.)



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
                                          ↳ QDP
                                            ↳ ForwardInstantiation
QDP
                                                ↳ ForwardInstantiation
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U2_GA(., mergesort_out_ga(x1)) → MERGESORT_IN_GA(.)
MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U1_GA(split_out_gaa(., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.))) we obtained the following new rules:

U1_GA(split_out_gaa(., .)) → U2_GA(., U1_ga(split_in_gaa(.)))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
                                          ↳ QDP
                                            ↳ ForwardInstantiation
                                              ↳ QDP
                                                ↳ ForwardInstantiation
QDP
                                                    ↳ ForwardInstantiation
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U2_GA(., mergesort_out_ga(x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.))
U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., .)) → U2_GA(., U1_ga(split_in_gaa(.)))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U1_GA(split_out_gaa(., y1)) → U2_GA(y1, mergesort_out_ga(.)) we obtained the following new rules:

U1_GA(split_out_gaa(., .)) → U2_GA(., mergesort_out_ga(.))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
                                          ↳ QDP
                                            ↳ ForwardInstantiation
                                              ↳ QDP
                                                ↳ ForwardInstantiation
                                                  ↳ QDP
                                                    ↳ ForwardInstantiation
QDP
                                                        ↳ NonTerminationProof
      ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

U1_GA(split_out_gaa(., .)) → U2_GA(., mergesort_out_ga(.))
U2_GA(., mergesort_out_ga(x1)) → MERGESORT_IN_GA(.)
MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., .)) → U2_GA(., U1_ga(split_in_gaa(.)))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U1_GA(split_out_gaa(., .)) → U2_GA(., mergesort_out_ga(.))
U2_GA(., mergesort_out_ga(x1)) → MERGESORT_IN_GA(.)
MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., .)) → U2_GA(., U1_ga(split_in_gaa(.)))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([])
mergesort_in_ga(.) → mergesort_out_ga(.)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs)
U2_ga(X2s, mergesort_out_ga(Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Ys)) → mergesort_out_ga(Ys)
merge_in_gga([], Xs) → merge_out_gga(Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa) → merge_out_gga(.)
merge_in_gaa(Xs) → merge_out_gaa
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa) → merge_out_gaa


s = U1_GA(U5_gaa(split_in_aaa)) evaluates to t =U1_GA(U5_gaa(split_in_aaa))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U1_GA(U5_gaa(split_in_aaa))U1_GA(U5_gaa(split_out_aaa([], [], [])))
with rule split_in_aaasplit_out_aaa([], [], []) at position [0,0] and matcher [ ]

U1_GA(U5_gaa(split_out_aaa([], [], [])))U1_GA(split_out_gaa(., []))
with rule U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., Zs) at position [0] and matcher [Xs / [], Ys / [], Zs / []]

U1_GA(split_out_gaa(., []))MERGESORT_IN_GA(.)
with rule U1_GA(split_out_gaa(., x1)) → MERGESORT_IN_GA(.) at position [] and matcher [x1 / []]

MERGESORT_IN_GA(.)U1_GA(U5_gaa(split_in_aaa))
with rule MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.




We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
mergesort_in: (f,b) (b,f)
split_in: (b,f,f) (f,f,f)
merge_in: (b,b,f) (b,f,f) (b,b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
PiTRS
          ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GAA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x6)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x5)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x6)
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x5, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x5)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x6)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x4, x5, x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x4, x5)
U7_GAA(x1, x2, x3, x4, x5, x6)  =  U7_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x4, x5, x6)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
PiDP
              ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → U1_AG(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_AG(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → U5_GAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_GAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → U5_AAA(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_AG(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_AG(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → SPLIT_IN_GAA(.(X, .(Y, Xs)), X1s, X2s)
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_GA(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_GA(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U3_GA(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGA(Y1s, Y2s, Ys)
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GAA(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_AG(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U2_AG(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_AG(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
U3_AG(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → MERGE_IN_GGG(Y1s, Y2s, Ys)
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GGG(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
MERGE_IN_GGG(.(X, Xs), .(Y, Ys), .(X, Zs)) → =_IN_AA(X, Y)
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_GGG(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U6_GGG(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U7_GGA(x1, x2, x3, x4, x5, x6)  =  U7_GGA(x6)
U6_GGA(x1, x2, x3, x4, x5, x6)  =  U6_GGA(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
U5_GAA(x1, x2, x3, x4, x5)  =  U5_GAA(x5)
U6_GGG(x1, x2, x3, x4, x5, x6)  =  U6_GGG(x6)
U5_AAA(x1, x2, x3, x4, x5)  =  U5_AAA(x5)
MERGE_IN_GGA(x1, x2, x3)  =  MERGE_IN_GGA(x1, x2)
U3_GA(x1, x2, x3, x4, x5, x6)  =  U3_GA(x5, x6)
=_IN_AA(x1, x2)  =  =_IN_AA
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x5)
U7_GGG(x1, x2, x3, x4, x5, x6)  =  U7_GGG(x6)
MERGE_IN_GGG(x1, x2, x3)  =  MERGE_IN_GGG(x1, x2, x3)
MERGESORT_IN_AG(x1, x2)  =  MERGESORT_IN_AG(x2)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA
U3_AG(x1, x2, x3, x4, x5, x6)  =  U3_AG(x4, x5, x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
U4_AG(x1, x2, x3, x4, x5)  =  U4_AG(x4, x5)
U7_GAA(x1, x2, x3, x4, x5, x6)  =  U7_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U2_AG(x1, x2, x3, x4, x5, x6)  =  U2_AG(x4, x5, x6)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)
U1_AG(x1, x2, x3, x4, x5)  =  U1_AG(x4, x5)
SPLIT_IN_GAA(x1, x2, x3)  =  SPLIT_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 3 SCCs with 25 less nodes.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
PiDP
                    ↳ UsableRulesProof
                  ↳ PiDP
                  ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
PiDP
                        ↳ PiDPToQDPProof
                  ↳ PiDP
                  ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U6_GAA(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → MERGE_IN_GAA(.(X, Xs), Ys, Zs)
MERGE_IN_GAA(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_GAA(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))

The TRS R consists of the following rules:

=_in_aa(X, X) → =_out_aa(X, X)

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U6_GAA(x1, x2, x3, x4, x5, x6)  =  U6_GAA(x6)
MERGE_IN_GAA(x1, x2, x3)  =  MERGE_IN_GAA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ Rewriting
                  ↳ PiDP
                  ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

MERGE_IN_GAA(.) → U6_GAA(=_in_aa)
U6_GAA(=_out_aa) → MERGE_IN_GAA(.)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

We have to consider all (P,Q,R)-chains.
By rewriting [15] the rule MERGE_IN_GAA(.) → U6_GAA(=_in_aa) at position [0] we obtained the following new rules:

MERGE_IN_GAA(.) → U6_GAA(=_out_aa)



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Rewriting
QDP
                                ↳ UsableRulesProof
                  ↳ PiDP
                  ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

The TRS R consists of the following rules:

=_in_aa=_out_aa

The set Q consists of the following terms:

=_in_aa

We have to consider all (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ UsableRulesProof
QDP
                                    ↳ QReductionProof
                  ↳ PiDP
                  ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

R is empty.
The set Q consists of the following terms:

=_in_aa

We have to consider all (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

=_in_aa



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Rewriting
                              ↳ QDP
                                ↳ UsableRulesProof
                                  ↳ QDP
                                    ↳ QReductionProof
QDP
                                        ↳ NonTerminationProof
                  ↳ PiDP
                  ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

U6_GAA(=_out_aa) → MERGE_IN_GAA(.)
MERGE_IN_GAA(.) → U6_GAA(=_out_aa)

The TRS R consists of the following rules:none


s = MERGE_IN_GAA(.) evaluates to t =MERGE_IN_GAA(.)

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

MERGE_IN_GAA(.)U6_GAA(=_out_aa)
with rule MERGE_IN_GAA(.) → U6_GAA(=_out_aa) at position [] and matcher [ ]

U6_GAA(=_out_aa)MERGE_IN_GAA(.)
with rule U6_GAA(=_out_aa) → MERGE_IN_GAA(.)

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.





↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
PiDP
                    ↳ UsableRulesProof
                  ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
PiDP
                        ↳ PiDPToQDPProof
                  ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

SPLIT_IN_AAA(.(X, Xs), .(X, Ys), Zs) → SPLIT_IN_AAA(Xs, Zs, Ys)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .
SPLIT_IN_AAA(x1, x2, x3)  =  SPLIT_IN_AAA

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ NonTerminationProof
                  ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SPLIT_IN_AAASPLIT_IN_AAA

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

SPLIT_IN_AAASPLIT_IN_AAA

The TRS R consists of the following rules:none


s = SPLIT_IN_AAA evaluates to t =SPLIT_IN_AAA

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from SPLIT_IN_AAA to SPLIT_IN_AAA.





↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
PiDP
                    ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)

The TRS R consists of the following rules:

mergesort_in_ag([], []) → mergesort_out_ag([], [])
mergesort_in_ag(.(X, []), .(X, [])) → mergesort_out_ag(.(X, []), .(X, []))
mergesort_in_ag(.(X, .(Y, Xs)), Ys) → U1_ag(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa([], [], []) → split_out_gaa([], [], [])
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U1_ag(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ag(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
=_in_aa(X, X) → =_out_aa(X, X)
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
merge_in_gaa([], Xs, Xs) → merge_out_gaa([], Xs, Xs)
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
U2_ag(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ag(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
U3_ag(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ag(X, Y, Xs, Ys, merge_in_ggg(Y1s, Y2s, Ys))
merge_in_ggg([], Xs, Xs) → merge_out_ggg([], Xs, Xs)
merge_in_ggg(Xs, [], Xs) → merge_out_ggg(Xs, [], Xs)
merge_in_ggg(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_ggg(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_ggg(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_ggg(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_ggg(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_ggg(.(X, Xs), .(Y, Ys), .(X, Zs))
U4_ag(X, Y, Xs, Ys, merge_out_ggg(Y1s, Y2s, Ys)) → mergesort_out_ag(.(X, .(Y, Xs)), Ys)

The argument filtering Pi contains the following mapping:
mergesort_in_ag(x1, x2)  =  mergesort_in_ag(x2)
[]  =  []
mergesort_out_ag(x1, x2)  =  mergesort_out_ag(x1, x2)
.(x1, x2)  =  .
U1_ag(x1, x2, x3, x4, x5)  =  U1_ag(x4, x5)
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
U2_ag(x1, x2, x3, x4, x5, x6)  =  U2_ag(x4, x5, x6)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U3_ag(x1, x2, x3, x4, x5, x6)  =  U3_ag(x4, x5, x6)
U4_ag(x1, x2, x3, x4, x5)  =  U4_ag(x4, x5)
merge_in_ggg(x1, x2, x3)  =  merge_in_ggg(x1, x2, x3)
merge_out_ggg(x1, x2, x3)  =  merge_out_ggg(x1, x2, x3)
U6_ggg(x1, x2, x3, x4, x5, x6)  =  U6_ggg(x6)
U7_ggg(x1, x2, x3, x4, x5, x6)  =  U7_ggg(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
PiDP
                        ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_GA(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U1_GA(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → MERGESORT_IN_GA(X1s, Y1s)
MERGESORT_IN_GA(.(X, .(Y, Xs)), Ys) → U1_GA(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
U2_GA(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s, Y2s)

The TRS R consists of the following rules:

mergesort_in_ga([], []) → mergesort_out_ga([], [])
mergesort_in_ga(.(X, []), .(X, [])) → mergesort_out_ga(.(X, []), .(X, []))
mergesort_in_ga(.(X, .(Y, Xs)), Ys) → U1_ga(X, Y, Xs, Ys, split_in_gaa(.(X, .(Y, Xs)), X1s, X2s))
split_in_gaa(.(X, Xs), .(X, Ys), Zs) → U5_gaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U1_ga(X, Y, Xs, Ys, split_out_gaa(.(X, .(Y, Xs)), X1s, X2s)) → U2_ga(X, Y, Xs, Ys, X2s, mergesort_in_ga(X1s, Y1s))
U5_gaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(.(X, Xs), .(X, Ys), Zs)
U2_ga(X, Y, Xs, Ys, X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(X, Y, Xs, Ys, Y1s, mergesort_in_ga(X2s, Y2s))
split_in_aaa([], [], []) → split_out_aaa([], [], [])
split_in_aaa(.(X, Xs), .(X, Ys), Zs) → U5_aaa(X, Xs, Ys, Zs, split_in_aaa(Xs, Zs, Ys))
U3_ga(X, Y, Xs, Ys, Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(X, Y, Xs, Ys, merge_in_gga(Y1s, Y2s, Ys))
U5_aaa(X, Xs, Ys, Zs, split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(.(X, Xs), .(X, Ys), Zs)
U4_ga(X, Y, Xs, Ys, merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(.(X, .(Y, Xs)), Ys)
merge_in_gga([], Xs, Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, [], Xs) → merge_out_gga(Xs, [], Xs)
merge_in_gga(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gga(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gga(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gga(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
=_in_aa(X, X) → =_out_aa(X, X)
U7_gga(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gga(.(X, Xs), .(Y, Ys), .(X, Zs))
merge_in_gaa(Xs, [], Xs) → merge_out_gaa(Xs, [], Xs)
merge_in_gaa(.(X, Xs), .(Y, Ys), .(X, Zs)) → U6_gaa(X, Xs, Y, Ys, Zs, =_in_aa(X, Y))
U6_gaa(X, Xs, Y, Ys, Zs, =_out_aa(X, Y)) → U7_gaa(X, Xs, Y, Ys, Zs, merge_in_gaa(.(X, Xs), Ys, Zs))
U7_gaa(X, Xs, Y, Ys, Zs, merge_out_gaa(.(X, Xs), Ys, Zs)) → merge_out_gaa(.(X, Xs), .(Y, Ys), .(X, Zs))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .
split_in_gaa(x1, x2, x3)  =  split_in_gaa(x1)
split_out_gaa(x1, x2, x3)  =  split_out_gaa(x1, x2, x3)
U5_gaa(x1, x2, x3, x4, x5)  =  U5_gaa(x5)
split_in_aaa(x1, x2, x3)  =  split_in_aaa
split_out_aaa(x1, x2, x3)  =  split_out_aaa(x1, x2, x3)
U5_aaa(x1, x2, x3, x4, x5)  =  U5_aaa(x5)
mergesort_in_ga(x1, x2)  =  mergesort_in_ga(x1)
mergesort_out_ga(x1, x2)  =  mergesort_out_ga(x1, x2)
U1_ga(x1, x2, x3, x4, x5)  =  U1_ga(x5)
U2_ga(x1, x2, x3, x4, x5, x6)  =  U2_ga(x5, x6)
U3_ga(x1, x2, x3, x4, x5, x6)  =  U3_ga(x5, x6)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x5)
merge_in_gga(x1, x2, x3)  =  merge_in_gga(x1, x2)
merge_out_gga(x1, x2, x3)  =  merge_out_gga(x1, x2, x3)
U6_gga(x1, x2, x3, x4, x5, x6)  =  U6_gga(x6)
=_in_aa(x1, x2)  =  =_in_aa
=_out_aa(x1, x2)  =  =_out_aa
U7_gga(x1, x2, x3, x4, x5, x6)  =  U7_gga(x6)
merge_in_gaa(x1, x2, x3)  =  merge_in_gaa(x1)
merge_out_gaa(x1, x2, x3)  =  merge_out_gaa(x1)
U6_gaa(x1, x2, x3, x4, x5, x6)  =  U6_gaa(x6)
U7_gaa(x1, x2, x3, x4, x5, x6)  =  U7_gaa(x6)
U2_GA(x1, x2, x3, x4, x5, x6)  =  U2_GA(x5, x6)
MERGESORT_IN_GA(x1, x2)  =  MERGESORT_IN_GA(x1)
U1_GA(x1, x2, x3, x4, x5)  =  U1_GA(x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U2_GA(X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.))
U1_GA(split_out_gaa(., X1s, X2s)) → MERGESORT_IN_GA(X1s)
U1_GA(split_out_gaa(., X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule U1_GA(split_out_gaa(., X1s, X2s)) → U2_GA(X2s, mergesort_in_ga(X1s)) at position [1] we obtained the following new rules:

U1_GA(split_out_gaa(., [], y1)) → U2_GA(y1, mergesort_out_ga([], []))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U1_GA(split_out_gaa(., [], y1)) → U2_GA(y1, mergesort_out_ga([], []))
MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.))
U2_GA(X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U1_GA(split_out_gaa(., X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
QDP
                                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

U2_GA(X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U1_GA(split_out_gaa(., X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule MERGESORT_IN_GA(.) → U1_GA(split_in_gaa(.)) at position [0] we obtained the following new rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
QDP
                                        ↳ ForwardInstantiation

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U2_GA(X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U1_GA(split_out_gaa(., X1s, X2s)) → MERGESORT_IN_GA(X1s)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U1_GA(split_out_gaa(., X1s, X2s)) → MERGESORT_IN_GA(X1s) we obtained the following new rules:

U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.)



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
QDP
                                            ↳ ForwardInstantiation

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.)
U2_GA(X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s)
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U2_GA(X2s, mergesort_out_ga(X1s, Y1s)) → MERGESORT_IN_GA(X2s) we obtained the following new rules:

U2_GA(., mergesort_out_ga(x1, x2)) → MERGESORT_IN_GA(.)



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
                                          ↳ QDP
                                            ↳ ForwardInstantiation
QDP
                                                ↳ ForwardInstantiation

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U2_GA(., mergesort_out_ga(x1, x2)) → MERGESORT_IN_GA(.)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, mergesort_out_ga(., .)) we obtained the following new rules:

U1_GA(split_out_gaa(., ., .)) → U2_GA(., mergesort_out_ga(., .))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
                                          ↳ QDP
                                            ↳ ForwardInstantiation
                                              ↳ QDP
                                                ↳ ForwardInstantiation
QDP
                                                    ↳ ForwardInstantiation

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.)))
U1_GA(split_out_gaa(., ., .)) → U2_GA(., mergesort_out_ga(., .))
U2_GA(., mergesort_out_ga(x1, x2)) → MERGESORT_IN_GA(.)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
By forward instantiating [14] the rule U1_GA(split_out_gaa(., ., y1)) → U2_GA(y1, U1_ga(split_in_gaa(.))) we obtained the following new rules:

U1_GA(split_out_gaa(., ., .)) → U2_GA(., U1_ga(split_in_gaa(.)))



↳ Prolog
  ↳ PredefinedPredicateTransformerProof
    ↳ Prolog
      ↳ PrologToPiTRSProof
      ↳ PrologToPiTRSProof
        ↳ PiTRS
          ↳ DependencyPairsProof
            ↳ PiDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ PiDP
                  ↳ PiDP
                  ↳ PiDP
                    ↳ UsableRulesProof
                      ↳ PiDP
                        ↳ PiDPToQDPProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ DependencyGraphProof
                                  ↳ QDP
                                    ↳ Narrowing
                                      ↳ QDP
                                        ↳ ForwardInstantiation
                                          ↳ QDP
                                            ↳ ForwardInstantiation
                                              ↳ QDP
                                                ↳ ForwardInstantiation
                                                  ↳ QDP
                                                    ↳ ForwardInstantiation
QDP
                                                        ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., ., .)) → U2_GA(., mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., .)) → U2_GA(., U1_ga(split_in_gaa(.)))
U2_GA(., mergesort_out_ga(x1, x2)) → MERGESORT_IN_GA(.)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)

The set Q consists of the following terms:

mergesort_in_ga(x0)
split_in_gaa(x0)
U1_ga(x0)
U5_gaa(x0)
U2_ga(x0, x1)
split_in_aaa
U3_ga(x0, x1)
U5_aaa(x0)
U4_ga(x0)
merge_in_gga(x0, x1)
U6_gga(x0)
=_in_aa
U7_gga(x0)
merge_in_gaa(x0)
U6_gaa(x0)
U7_gaa(x0)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by narrowing to the left:

The TRS P consists of the following rules:

MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))
U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.)
U1_GA(split_out_gaa(., ., .)) → U2_GA(., mergesort_out_ga(., .))
U1_GA(split_out_gaa(., ., .)) → U2_GA(., U1_ga(split_in_gaa(.)))
U2_GA(., mergesort_out_ga(x1, x2)) → MERGESORT_IN_GA(.)

The TRS R consists of the following rules:

mergesort_in_ga([]) → mergesort_out_ga([], [])
mergesort_in_ga(.) → mergesort_out_ga(., .)
mergesort_in_ga(.) → U1_ga(split_in_gaa(.))
split_in_gaa(.) → U5_gaa(split_in_aaa)
U1_ga(split_out_gaa(., X1s, X2s)) → U2_ga(X2s, mergesort_in_ga(X1s))
U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs)
U2_ga(X2s, mergesort_out_ga(X1s, Y1s)) → U3_ga(Y1s, mergesort_in_ga(X2s))
split_in_aaasplit_out_aaa([], [], [])
split_in_aaaU5_aaa(split_in_aaa)
U3_ga(Y1s, mergesort_out_ga(X2s, Y2s)) → U4_ga(merge_in_gga(Y1s, Y2s))
U5_aaa(split_out_aaa(Xs, Zs, Ys)) → split_out_aaa(., ., Zs)
U4_ga(merge_out_gga(Y1s, Y2s, Ys)) → mergesort_out_ga(., Ys)
merge_in_gga([], Xs) → merge_out_gga([], Xs, Xs)
merge_in_gga(Xs, []) → merge_out_gga(Xs, [], Xs)
merge_in_gga(., .) → U6_gga(=_in_aa)
U6_gga(=_out_aa) → U7_gga(merge_in_gaa(.))
=_in_aa=_out_aa
U7_gga(merge_out_gaa(.)) → merge_out_gga(., ., .)
merge_in_gaa(Xs) → merge_out_gaa(Xs)
merge_in_gaa(.) → U6_gaa(=_in_aa)
U6_gaa(=_out_aa) → U7_gaa(merge_in_gaa(.))
U7_gaa(merge_out_gaa(.)) → merge_out_gaa(.)


s = U1_GA(U5_gaa(split_in_aaa)) evaluates to t =U1_GA(U5_gaa(split_in_aaa))

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

U1_GA(U5_gaa(split_in_aaa))U1_GA(U5_gaa(split_out_aaa([], [], [])))
with rule split_in_aaasplit_out_aaa([], [], []) at position [0,0] and matcher [ ]

U1_GA(U5_gaa(split_out_aaa([], [], [])))U1_GA(split_out_gaa(., ., []))
with rule U5_gaa(split_out_aaa(Xs, Zs, Ys)) → split_out_gaa(., ., Zs) at position [0] and matcher [Xs / [], Ys / [], Zs / []]

U1_GA(split_out_gaa(., ., []))MERGESORT_IN_GA(.)
with rule U1_GA(split_out_gaa(., ., x1)) → MERGESORT_IN_GA(.) at position [] and matcher [x1 / []]

MERGESORT_IN_GA(.)U1_GA(U5_gaa(split_in_aaa))
with rule MERGESORT_IN_GA(.) → U1_GA(U5_gaa(split_in_aaa))

Now applying the matcher to the start term leads to a term which is equal to the last term in the rewriting sequence


All these steps are and every following step will be a correct step w.r.t to Q.